# -*- coding: iso-8859-15 -*-

'''
@author: carlos
'''
import Account

class User(object):
    '''
    classdocs
    '''
    
    def __init__(self, name, mail):
        '''
        Constructor
        '''
        self.name = ""
        self.mail = ""
        self.__accounts = []
        
    def add_account(self, account):
        account.user = self
        self.__accounts.append(account)
        
    def get_account(self, name):
        account =  Account.Account(name)
        i = self.__accounts.index( account )
        return self.__accounts[i]
        